package com.wenyu.wenyuyuedu.activity.homepage;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.jingchen.pulltorefresh.PullToRefreshLayout;
import com.jingchen.pulltorefresh.PullableListView;
import com.wenyu.wenyuyuedu.R;
import com.wenyu.wenyuyuedu.utils.MyToast;

import butterknife.ButterKnife;
import butterknife.InjectView;

/*首页神贴的详情页*/
public class DeityActivity extends AppCompatActivity implements View.OnClickListener {

    @InjectView(R.id.invitation_left)
    ImageView invitationLeft;
    @InjectView(R.id.invitation_from_content)
    TextView invitationFromContent;
    @InjectView(R.id.invetation_content_view)
    PullableListView invetationContentView;
    @InjectView(R.id.invetation_refresh_view)
    PullToRefreshLayout invetationRefreshView;
    @InjectView(R.id.et_invitation)
    EditText etInvitation;
    @InjectView(R.id.tv_invitation)
    TextView tvInvitation;
    private Intent getIntent;
    private Intent intent;
    /*帖子的id*/
    private String deityid;
    /*来自的圈子*/
    private String deitytitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_deity);
        ButterKnife.inject(this);
        initView();
    }

    /*初始化根布局*/
    private void initView() {
        intent = new Intent();
        getIntent = getIntent();
        deityid = getIntent().getStringExtra("deityid");
        deitytitle = getIntent().getStringExtra("deitytitle");
        etInvitation.setOnClickListener(this);
        invitationLeft.setOnClickListener(this);
        invitationFromContent.setText(deitytitle);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            /*返回*/
            case R.id.invitation_left:
                finish();
                break;
            /*评论的框*/
            case R.id.et_invitation:
                MyToast.showToast(DeityActivity.this,"请选择评论的对象", Toast.LENGTH_SHORT);
                break;

            default:

                break;
        }
    }
}
